package reflect;

import java.lang.reflect.Constructor;

public class Test {
    public static void main(String[] args) throws Exception {
        Class c=Class.forName("reflect.Student");
        Constructor c1=c.getConstructor();
        Object o1=c1.newInstance();
        System.out.println(o1);

        Constructor c2=c.getConstructor(String.class,int.class,char.class);
        Object o2=c2.newInstance("ming",18,'f');
        System.out.println(o2);
    }
}
